/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package foalvleditor.gui;

import foalvleditor.gameobjects.Bitmap;
import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import javax.swing.JMenuItem;

/**
 *
 * @author Mikael
 */
public class JImageMenuItem extends JMenuItem {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Bitmap bitmap;

    public JImageMenuItem(AbstractAction aa){
        super(aa);
        this.setAction(aa);
        this.setText("");
    }

    JImageMenuItem() {
        super();
    }

    public void setBitmap(Bitmap bitmap){
        this.bitmap=bitmap;
        this.setIcon(new ImageIcon(bitmap.getBufferedImage()));
    }

    public Bitmap getBitmap(){
        return this.bitmap;
    }
}
